When a switching power supply with power frequency ripples, or a frequency that is lower than a power frequency in an output current and an output voltage, is configured to drive a light-emitting diode (LED) load, flicker can occur on the LED load. In one example switching power supply, a large electrolytic capacitor may be used to store energy in order to provide a DC voltage to an LED load to decrease the output current ripple. However, power factor correction (PFC) may not be achieved in such an approach, and the service life may be decreased due to the electrolytic capacitor.